<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.xjtu.myday10.domin.Caluate" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>简单计算器</title>
</head>
<body>

<jsp:useBean id="ca" class="com.xjtu.myday10.domin.Caluate" scope="request"></jsp:useBean>
<jsp:getProperty property="num1" name="ca"/>
<jsp:getProperty property="operator" name="ca"/>
<jsp:getProperty property="num2" name="ca"/>
=
<jsp:getProperty property="result" name="ca"/>
<hr>
 <form action="/myday10/CaluateServlet" method="post">
    <table border="1" align="center">
       <tr> 
         <td colspan="2">一个简单的计算器</td>
       </tr>
        <tr>
           <td>参数1</td>
           <td><input type="text" name="num1" value='<jsp:getProperty property="num1" name="ca"/>'/></td>
        </tr>
        <tr>
           <td>操作</td>
           <td>
                 <select name="operator">
                 
                
                 
                    <option selected>+</option>
                    <option>-</option>
                    <option>*</option>
                    <option>/</option>
                  
                 </select>
           
           
           </td>
        </tr>
         <tr>
           <td>参数2</td>
           <td><input type="text" name="num2" value='<jsp:getProperty property="num2" name="ca"/>' /></td>
        </tr>
        <tr>
           <td colspan="2"><input  style=" border-style : groove " type="submit" value="提交"/></td>
        
        </tr>
    
    </table>
 
 
 
 </form>
</body>
</html>